export const fieldType = [
  'varchar',
  'char',
  'int',
  'json',
  'datetime',
  'decimal'
]

export const actionType = [
  { label: '列表查询', value: 'SimpleQuery', mapToEditor: 'select' },
  { label: '单个查询', value: 'SimpleQueryOne', mapToEditor: 'selectOne' },
  { label: '新增', value: 'SimpleInsert', mapToEditor: 'insert' },
  {
    label: '物理删除',
    value: 'SimpleRealDelete',
    mapToEditor: 'delete',
    isRealDelete: true
  },
  {
    label: '逻辑删除',
    value: 'SimpleSoftDelete',
    mapToEditor: 'delete',
    isRealDelete: false
  },
  { label: '更新', value: 'SimpleUpdate', mapToEditor: 'update' },
  { label: '自定义脚本', value: 'CustomScript', mapToEditor: 'customScript' }
]

// 默认初始化的只读字段
export const defaultReadonlyFields = [
  'id',
  'create_by',
  'create_time',
  'update_by',
  'update_time',
  'remarks',
  'del_flag'
]
